let app = getApp()
var util = require('../../../utils/util.js');
Component({
    properties: {
      show:Boolean
      },
      data:{
        loginShow:false,
        startDate:'1961-01-21',
        endDate:'2023-01-21'
      },
    lifetimes: {
        attached: function () {
            var TIME = util.formatTime(new Date());
             this.setData({
              startValue:TIME.substring(0,10),
              endValue:TIME.substring(0,10)
             })
         }
      },
    methods: {
      confirm:function() {
        var time=[];
        time['starttime']= this.data.startValue;
        time['endtime']= this.data.endValue;
        this.triggerEvent ('time',time)
        this.setData({
          show:false
        })
      },
      starttime:function(e) {
        this.setData({
          startValue:e.detail.value
         })
      },
      endtime:function(e) {
        this.setData({
          endValue:e.detail.value
         })
      },
      cancael:function(){
        this.setData({
          show:false
        })
      }
    }
});
